var rule = {
    title: '咕咕TV',
    host: 'https://cooingc.cc',
    url: '/vodshow/fyclass--------fypage---/',
    searchUrl: '/vodsearch/**----------fypage---/',
    searchable: 2,//是否启用全局搜索,
    quickSearch: 0,//是否启用快速搜索,
    filterable: 0,//是否启用分类筛选,
    headers: {
                'User-Agent':'okhttp/3.12.11', // "Cookie":"searchneed=ok"
            },
    编码: 'utf-8',
    timeout: 5000,
    class_name:'动漫&电影&剧集&短剧&综艺',
    class_url:'1&2&3&63&4',
    tab_exclude: '*',
    play_parse: true,
    lazy: `js:
            if(/\\.(m3u8|mp4)/.test(input)){
                input = {parse:0,url:input}
            }else{
                if(rule.parse_url.startsWith('json:')){
                    let purl = rule.parse_url.replace('json:','')+input;
                    let html = request(purl);
                    input = {parse:0,url:JSON.parse(html).url}
                }else{
                    input= rule.parse_url+input; 
                }
            `,
    limit: 6,
    double: true,
    推荐: '*',
    //一级: ".text-center.text-sm;span&&Text;img&&data-original;.leading-loose.line-clamp-1&&Text;button&&onclick;p&&Test",
    一级: $js.toString(() => {
        let d = [];
        let html = request(input);
        let list = pdfa(html, '.text-center.text-sm');
        list.forEach(item => {
            var title = pdfh(item, 'span&&Text');
            var pic = pdfh(item, 'img&&data-original');
            var desc = pdfh(item, 'p:eq(2)&&Text');
            var url = pd(item, 'button&&onclick', MY_URL);
            const regex = /'(.+?)'/;
            url = 'https://cooingc.cc' + url.match(regex)[1];
            //.replace("'","");
            if (title) {
                d.push({
                    title: title,
                    img: pic,
                    desc: desc,
                    url: url
                });
            }
        });
        setResult(d);
    }),
    二级: {
        "title": ".text-2xl.mb-4&&Text",
        "img": "img&&data-original",
        "desc": "p:eq(2)&&Text;p:eq(3)&&Text",
        "content": ".w-full.mt-12--span&&Text",
        tabs:'js:TABS = ["线路1"]',
        //"lists": ".video_list.play_list_asc:eq(#id)&&button",
        "lists": $js.toString(() => {
            LISTS = [];
            //log(input);
            let lists1 = pdfa(html, '.video_list.play_list_asc&&button').map(it => {
                let _tt = pdfh(it, 'button&&Text');
                let _uu = 'https://cooingc.cc' + pdfh(it, 'button&&onclick').match(/'(.+?)\/'/)[1];
                return _tt + '$' + _uu
            });
            LISTS.push(lists1);
        }),
        //tab_text: 'body&&Text',
        //list_text: 'a&&Text',
        //list_url: 'button&&onclick'
        },
    搜索: $js.toString(() => {
        let d = [];
        let html = request(input);
        let list = pdfa(html, '.flex.flex-row.min-h-64.my-4.relative');
        list.forEach(item => {
            var title = pdfh(item, '.text-2xl&&Text');
            var pic = pdfh(item, 'img&&data-original');
            var desc = pdfh(item, 'p:eq(2)&&Text');
            var url = pd(item, 'button&&onclick', MY_URL);
            const regex = /'(.+?)'/;
            url = 'https://cooingc.cc' + url.match(regex)[1];
            //.replace("'","");
            if (title) {
                d.push({
                    title: title,
                    img: pic,
                    desc: desc,
                    url: url
                });
            }
        });
        setResult(d);
    }),
            }